package com.imti.mall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.imti.mall.model.pms.pojo.PmsProductAttribute;

import com.imti.mall.product.mapper.PmsBrandMapper;
import com.imti.mall.product.mapper.PmsProductAttributeMapper;
import com.imti.mall.product.service.PmsProductAttributeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 商品属性参数表(PmsProductAttribute)表服务实现类
 *
 * @author makejava
 * @since 2023-03-03 00:52:44
 */
@Service("pmsProductAttributeService")
public class PmsProductAttributeServiceImpl extends ServiceImpl<PmsProductAttributeMapper, PmsProductAttribute> implements PmsProductAttributeService {
    @Resource
    private PmsProductAttributeMapper pmsProductAttributeMapper;
    @Override
    public List<PmsProductAttribute> fetchList(Integer cid, Integer productAttributeCategoryId, Integer type) {
        QueryWrapper queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("product_attribute_category_id",productAttributeCategoryId);
        queryWrapper.eq("type",type);
        return pmsProductAttributeMapper.selectList(queryWrapper);
    }
}

